package com.byxm.wlgw.query;

public class KcxxQuery extends BaseQuery{

	public KcxxQuery(String sTableNm) {
		super(sTableNm);
	}

	public String getKcxxByspxxid(int spxxid){
		StringBuffer sql = new StringBuffer();
		sql.append("select t1.kcxxid,t1.spxxid,t1.kcsl,t2.spxhnr,t2.xhid" +
				" from kcxx t1 left join spxh t2 on t1.xhid=t2.xhid" +
				" where spxxid=");
		sql.append(spxxid);
		sql.append(" order by xhid");
		return sql.toString();
	}
	
	public String saveKcxxSql(){
		StringBuffer sql=new StringBuffer();
		sql.append("insert into kcxx (spxxid,xhid,kcsl)values(?,?,?)");
		return sql.toString();
	}
	
}
